/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-02-10
 * Time:15:53
 */
public class Test {
    public static void main(String[] args) {
        TreeNode node1 = new TreeNode(0);
        TreeNode node2 = new TreeNode(2);
        TreeNode node3 = new TreeNode(4);
        TreeNode node4 = new TreeNode(1);
        TreeNode node5 = new TreeNode(3);
        TreeNode node6 = new TreeNode(-1);
        TreeNode node7 = new TreeNode(5);
        TreeNode node8 = new TreeNode(1);
        TreeNode node9 = new TreeNode(6);
        TreeNode node10 = new TreeNode(8);

        node1.left = node2;
        node1.right = node3;
        node2.left = node4;
        node3.left = node5;
        node3.right = node6;
        node4.left = node7;
        node4.right = node8;
        node5.right = node9;
        node6.right = node10;
        Solution solution = new Solution();
        int ret = solution.sumOfLeftLeaves(node1);
        System.out.println(ret);
    }
}
